package com.warm.io;

import java.io.*;

public class Demo00Copyfile {
    public static void main(String[] args) throws IOException {
        long s=System.currentTimeMillis();

        FileInputStream fis=new FileInputStream("c:\\新建文件夹\\1.jpg");
        FileOutputStream fos=new FileOutputStream("d:\\1.jpg");
        int len=0;
        while((len=fis.read())!=-1){
            fos.write((len));
        }
        fos.close();
        fis.close();


        long e=System.currentTimeMillis();
        System.out.println("复制文件共用了："+(e-s)+"毫秒");
    }

}
